xen/arm: Let the toolstack configure the number of SPIs
authorJulien Grall <julien.grall@linaro.org>
Tue, 28 Apr 2015 14:32:25 +0000 (15:32 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Fri, 8 May 2015 14:41:57 +0000 (15:41 +0100)
commit986b4d2cfa757bfc82bfd3d627069a0a6fd50b0f
tree581d6deeeeeb1e4456c24f026e9fd8352b1ed312
parent8a3e8c6d8df805ec68846621579a32d8390f5e9c
xen/arm: Let the toolstack configure the number of SPIs

Each domain may have a different number of IRQs depending on the devices
assigned to it.

Rather than re-using the number of IRQs used by the hardwared GIC, let
the toolstack specify the number of SPIs when the domain is created.
This will avoid wasting memory.

To calculate the number of SPIs, we take advantage of the fact that the
libxl interface can only expose 1:1 mapping and look for the largest SPI
in the list.

Signed-off-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Jan Beulich <jbeulich@suse.com>
Cc: Wei Liu <wei.liu2@citrix.com>
tools/libxc/xc_domain.c
tools/libxl/libxl_arm.c
xen/arch/arm/domain.c
xen/arch/arm/setup.c
xen/arch/arm/vgic.c
xen/include/asm-arm/vgic.h
xen/include/public/arch-arm.h